def sum_list(list1):
    sum1 = 0
    for i in range(0,len(list1)):
        sum1 += list1[i]
    return sum1
print(sum_list([1,2,3,4]))

